class beatmachine():
    def __init__(self):
        self.length = 16
        self.height = 6
        self.faders = [0.0 for i in range(self.length)]
        self.buttons = [[0 for j in range(self.height)] for i in range(self.length)]
        self.channel = 1
        self.startingNote = 36
    def fader(self, column, amount):
        self.faders[column] = amount
    def button(self, row, column, state):
        self.buttons[column][row] = state
    def activateColumn(self, column, noteState):
        #(type, channel, d1, d2)
        notes = []
        for i in range(len(self.buttons[column])):
            if self.buttons[column][i] == 1.0:
                notes.append((noteState, self.channel, self.startingNote + i, int(self.faders[column] * 127.0)))
        return notes